home *** CD-ROM | disk | FTP | other *** search
- #ifndef __SPACES__
- #define __SPACES__
-
- #include <Drag.h>
-
- #define kPrivateEventClass 'Sprv'
- #define kAESetSpace 'SSpc'
- #define keyWindowOfSpace 'SpWn'
- #define keyNumOfSpace 'RSpN'
- #define keySpecOfSpace 'SpFS'
-
-
- enum {
- kNoSpace = -1,
- kNumberOfSpaces = 2,
- kSpaceVSize = 50,
- kSpaceHSize = 50
- };
-
-
-
-
- struct SpaceRecord {
- Rect spaceRect; // Rect for space hit detection
- Handle spaceIconSuite; // Icon suite used to draw space (or NULL)
- Boolean spaceIsTaken; // is this slot taken by something already?
- FSSpec spaceSpec; // FSSpec pointing to space object- only
- // significant if spaceIsTaken is true
- Boolean spaceIsSelected;// is it selected ? (like in the Finder)
- };
- typedef struct SpaceRecord SpaceRecord, *SpacePtr, **SpaceHandle;
-
- // data structure for windows
-
- struct WindowData {
- SpaceRecord space[kNumberOfSpaces];
- };
- typedef struct WindowData WindowData, *WindowDataPtr, **WindowDataHandle;
-
-
-
- void GetSpaceRect(WindowPtr win, short spaceIndex, Rect *rct);
- short WhichSpace(WindowPtr win, Point localPt);
- OSErr SendSetterToSelf(short spaceNum, WindowPtr win, FSSpecPtr hfsObj);
- void SendWindowSpaceSetter(WindowPtr win, DragReference theDrag, FSSpecPtr hfsObj);
- void SetSpaceIndex(WindowPtr win, short index, FSSpecPtr hfsObj);
- void GetSpaceIconSuite(WindowPtr win, short count, Handle *iconSuite);
- void InitSpaces(WindowDataHandle winData);
- pascal OSErr DoAESetSpace(AppleEvent *ae, AppleEvent *reply, long refCon);
- OSErr GetSpaceSpec(WindowPtr theWindow, short spaceIndex, FSSpecPtr theSpec);
-
-
- #endif